{% if vue == 'agenda' %}
	{% if accounts|length > 0 %}
	<table class="table" id="listAccount" style="margin:0;">
	{% for account in accounts %}
		<tr>
			<td class="account-content-box" style="border-top:0;">
				<input type="checkbox" style="display:none;" value="" />
				<input type="hidden" value="{{ account.color }}" name="colorAccount" />
				<input type="hidden" value="{{ account.id }}" name="idAccount" />
				<div rel="tooltip" title="Compte {{ account.name }}" class="account-box fc-event-skin {{ account.color }}"></div> {{ account.title }}
			</td>
			<td style="border-top:0; width:20px;">
				<div class="btn-group">
		          <a data-toggle="dropdown" class="btn btn-small dropdown-toggle" style="text-decoration:none; padding:2px 6px; margin-top:-3px;"><span class="caret"></span></a>
		          <ul class="dropdown-menu pull-right">
		            <li><a href="#">Paramètrer le compte</a></li>
                            <li><a href="#">Ajouter évènement</a></li>
		          </ul>
		        </div>
			</td>
		</tr>
	{% endfor %}
	</table>
	{% else %}
	<div class="alert">
    	Aucun compte enregistré
    </div>
	{% endif %}
{% elseif vue == 'profil' %}

	{% if accounts|length > 0 %}
	<div id="listProfilAccount" class="accordion">
	{% for account in accounts %}
    	<div class="accordion-group">
            <div class="accordion-heading" style="position:relative;">
                <a href="#account{{ account.id }}" data-parent="#listProfilAccount" data-toggle="collapse" class="accordion-toggle" onclick="return false;">
                  	<div class="account-box fc-event-skin {{ account.color }}"></div>
					{{ account.title }}
					{% if account.active %}
						(Activé)
					{% else %}
						(Désactivé)
					{% endif %}
                </a>
                <input type="checkbox" value="{{ account.id }}" checked="checked" name="accountParticipant" style="position:absolute; right:10px; top:7px;" />
              	</div>
           	<div class="accordion-body collapse{% if openAccount == account.id %} in{% endif %}" id="account{{ account.id }}">
                <div class="accordion-inner">
	                <form action="{{ path('account_edit', {'id':account.id}) }}" {{ form_enctype(account.editForm) }} method="POST" class="form-horizontal" style="margin:8px 0 2px 10px;">
	                {{ form_errors(account.editForm) }}
					{{ form_row(account.editForm.active, { 'label': 'Activer'}) }}
					{{ form_row(account.editForm.title, { 'label': 'Nom du compte'}) }} 
					{{ form_row(account.editForm.color, { 'label': 'Couleur'}) }} 
					{% if account.accountType.title is defined and account.accountType.id != default_account_id %}
					<h6 style="margin-bottom: 8px;">Paramètres de connexion {% if account.accountType.title is defined %}({{ account.accountType.title }}){% endif %}</h6>
					{{ form_row(account.editForm.username, { 'label': 'Identifiant'}) }} 
	                {{ form_row(account.editForm.password, { 'label': 'Mot de passe'}) }}
	                {% endif %}
	                <div style="display:none;">{{ form_rest(account.editForm) }}</div>
	                <p style="text-align:right">
	                	<a href="{{ path('account_remove', {'id':account.id}) }}" rel="supprAccount" class="btn btn-danger" style="display:none; float:left;">Supprimer</a>
	                	<input type="submit" class="btn btn-primary" value="Enregistrer les modifications" />
	                </p> 
	                </form> 
	            </div>
        	</div>
    	</div>
    {% endfor %}
    </div>
	{% else %}
	<div class="alert">
    	Aucun compte enregistré
    </div>
	{% endif %}	
	
{% endif %}